
public class Test {

	static int[] arr;
	
	public static void main(String[] args) {
		int[] array = new int[1];
		printArrayInfo(array);
		printArrayInfo(arr);
	}

	static void printArrayInfo(int[] arr){
		try {
			System.out.println("The lenght of array is "+arr.length);
			System.out.println(arr[3]);
		} catch (NullPointerException e) {
			System.out.println("This arr does nto exist");
		} catch (ArrayIndexOutOfBoundsException e) {
			System.out.println("You are out of the bounds of the array");
		}
		
		
		System.out.println("This is info about 2 element..");
	}
}
